import 'package:fish_redux/fish_redux.dart';
import 'package:fish_redux_demo/index_page/action.dart';
import 'package:flutter/material.dart' hide Action;

import 'state.dart';

Widget buildView(IndexState state, Dispatch dispatch, ViewService viewService) {
  return Scaffold(
      appBar: AppBar(
        backgroundColor: state.themeColor,
        title: const Text('Index'),
      ),
      body: Center(
        child: RaisedButton(
          padding: const EdgeInsets.only(
              left: 20.0, top: 10.0, right: 20.0, bottom: 10.0),
          color: state.themeColor,
          child: const Text('jump',
              style: TextStyle(
                fontSize: 18,
                shadows: <Shadow>[
                  Shadow(color: Colors.white, offset: Offset(1, 2))
                ],
              ),
              overflow: TextOverflow.ellipsis),
          onPressed: () => dispatch(IndexActionCreator.onJump()),
        ),
      ));
}
